<?php

class Application_Form_Gestsuivform extends Zend_Form
{

    public function init()
    {
        /* Form Elements & Other Definitions Here ... */
    	$form = new Zend_Form_Element_Select("Formation");
    	$form->setMultiOptions(array('0'=>'Choisir formation', '1' => 'MP2L', '2' => 'N2TR', '3' => 'C2i'));
    	$form->setRequired(true)->addValidator('NotEmpty', true);
    	$form->setLabel("Formation")->addDecorator('HtmlTag',array('tag' => 'div', 'id' => 'formdiv') );
    	$form->setAttrib("ondblclick", "AjaxLoading('geteltform',this.value,'form')");
    	
    	$form->setAttrib("onclick", "loadClass('listeclasse',this.value,'Classe'),LoadUe('listeue',this.value,'UniteEnseignementCss')");
    	
    	
    	/* Form Elements & Other Definitions Here ... */
    	$semestre = new Zend_Form_Element_Select("Semestre");
    	$semestre->setMultiOptions(array('0'=>'Choisir semestre', '1' => 'Semestre1', '2' => 'Semestre2', '3' => 'Semestre3'));
    	$semestre->setLabel("Semestre")->addDecorator('HtmlTag',array('tag' => 'div', 'id' => 'semestrediv') );
    	$semestre->setAttrib("ondblclick", "AjaxLoading('geteltform',this.value,'semestre')");
    	 
    	$semestre->setAttrib("onclick", "loadClass('listeclasse',this.value,'Classe'),LoadUe('listeue',this.value,'UniteEnseignementCss')");
    	 
    	
    	
    	//$eltform=new Application_Model_DbTable_ScolariteEltdiplome();
    	
    	//$diploms=$eltdiplome->selectForOptions();
    	
    	
    	
    	$this->addElements(array($form, $semestre));
    	$this->setElementDecorators(array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors',
    			new Zend_Form_Decorator_HtmlTag(array(
    					'tag'   => 'div', "class"=>"control-group"
    			))
    	));
    	
    }


}

